Skip to content

Fix calculation error with theoretical maximum Poison stacks#9595

Merged
LocalIdentity merged 1 commit intoPathOfBuildingCommunity:devfrom
majochem:fix/poisonStacking
Mar 15, 2026
Merged

Fix calculation error with theoretical maximum Poison stacks#9595
LocalIdentity merged 1 commit intoPathOfBuildingCommunity:devfrom
majochem:fix/poisonStacking

Conversation

@majochem
Copy link
Contributor

Description of the problem being solved:

My previous calculation of the theoretical maximum poison stacks used a value for singleHitPoisonStacks that also took into account hit chance and poison chance. However, that incorrectly assumed that a fraction of the additionalPoisonStacks could be applied, leading to higher theoretical maximums.

As a result, lowering your hit chance or poison chance could lead to higher actual poison DPS which is obviously not true. (except the edge cases when lowering hit/poison chance puts you below the threshold for "non-Poisoned Enemy")

Steps taken to verify a working solution:

  • Tested with lower poison chance and now value does not exceed actual theoretical maximum

Link to a build that showcases this PR:

Test Build
(see config mods for easy reproduction of wrong value in current version)

Before screenshot:

image

95% poison chance leads to 13.44 poison stacks

After screenshot:

image

Poison stacks correctly limited to 12

@majochem majochem marked this pull request as ready for review March 14, 2026 23:55
@LocalIdentity LocalIdentity added the bug: calculation Numerical differences label Mar 15, 2026
@LocalIdentity LocalIdentity changed the title Fix calculation error with theoretical maximum poison stacks Fix calculation error with theoretical maximum Poison stacks Mar 15, 2026
@LocalIdentity LocalIdentity merged commit 6a36ad6 into PathOfBuildingCommunity:dev Mar 15, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug: calculation Numerical differences

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants